
package com.huaweicloud.saaslanding.install.properties.idaas;

import com.huaweicloud.saaslanding.install.constant.ModelConstant;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import jakarta.validation.constraints.NotEmpty;

/**
 * 功能描述
 *
 * @since 2022-03-23
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Component
@Validated
@ConfigurationProperties(prefix = ModelConstant.ONEACCESS_TENANT_PREFIX)
public class IdaasOrganization {
    /**
     * 组织id
     */
    private String orgId;

    /**
     * 父级组织id
     */
    private String parentId = null;

    /**
     * 组织名
     */
    @NotEmpty(message = "组织名(oneaccess.org.name)不能为空")
    private String name;

    /**
     * 组织code
     */
    @NotEmpty(message = "组织code(oneaccess.org.orgCode)不能为空")
    private String orgCode;
}
